package com.jh.paymentchannel.payment;

import com.google.common.base.MoreObjects;
import org.springframework.hateoas.ResourceSupport;

import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * {@link com.jh.paymentchannel.pojo.PaymentOrderStatistic} entity DTO.
 *
 * @author Fuchun
 * @since 1.0
 */
public class PosDTO extends ResourceSupport {

    private final Long posId;
    private final Long userId;
    private final OrderType orderType;
    private final Integer dealNumber;
    private final BigDecimal totalAmount;
    private final BigDecimal totalProfit;
    private final Integer weekOfYear;
    private final LocalDateTime createTime;

    public PosDTO(
            Long posId, Long userId, OrderType orderType, Integer dealNumber, BigDecimal totalAmount,
            BigDecimal totalProfit, Integer weekOfYear, LocalDateTime createTime) {
        this.posId = posId;
        this.userId = userId;
        this.orderType = orderType;
        this.dealNumber = dealNumber;
        this.totalAmount = totalAmount;
        this.totalProfit = totalProfit;
        this.weekOfYear = weekOfYear;
        this.createTime = createTime;
    }

    public Long getPosId() {
        return posId;
    }

    public Long getUserId() {
        return userId;
    }

    public OrderType getOrderType() {
        return orderType;
    }

    public Integer getDealNumber() {
        return dealNumber;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public BigDecimal getTotalProfit() {
        return totalProfit;
    }

    public Integer getWeekOfYear() {
        return weekOfYear;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("posId", posId)
                .add("userId", userId)
                .add("orderType", orderType)
                .add("dealNumber", dealNumber)
                .add("totalAmount", totalAmount)
                .add("totalProfit", totalProfit)
                .add("weekOfYear", weekOfYear)
                .add("createTime", createTime)
                .toString();
    }
}
